package com.link2room.quintesson.entity;

import com.link2room.common.entity.BaseEntity;
import org.hibernate.annotations.DynamicInsert;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * Created by sss on 2017/4/6.
 */
@Entity
@Table(name = "taobao_xrate")
@DynamicInsert
public class TaobaoXrate extends BaseEntity{
    private String mcCode;
    private String mcdCode;
    private String rpCode;
    private String hotelRpCode;
    private String rmtype;
    private String gidRpid;
    private Long gid;
    private Long rpid;
    private String name;
    private Long addBed;
    private Long addBedPrice;
    private Long currencyCode;
    private Long shijiaTag;
    private Long jishiquerenTag;
    private Date lockStartTime;
    private Date lockEndTime;
    private Long matchStatus;
    private String matchInfo;
    private String vendor;
    private String isMatch;

    @Basic
    @Column(name = "mc_code", nullable = false, length = 64)
    public String getMcCode() {
        return mcCode;
    }

    public void setMcCode(String mcCode) {
        this.mcCode = mcCode;
    }

    @Basic
    @Column(name = "mcd_code", nullable = true, length = 64)
    public String getMcdCode() {
        return mcdCode;
    }

    public void setMcdCode(String mcdCode) {
        this.mcdCode = mcdCode;
    }

    @Basic
    @Column(name = "rp_code", nullable = false, length = 32)
    public String getRpCode() {
        return rpCode;
    }

    public void setRpCode(String rpCode) {
        this.rpCode = rpCode;
    }

    @Basic
    @Column(name = "hotel_rp_code", nullable = false, length = 64)
    public String getHotelRpCode() {
        return hotelRpCode;
    }

    public void setHotelRpCode(String hotelRpCode) {
        this.hotelRpCode = hotelRpCode;
    }

    @Basic
    @Column(name = "rmtype", nullable = true, length = 30)
    public String getRmtype() {
        return rmtype;
    }

    public void setRmtype(String rmtype) {
        this.rmtype = rmtype;
    }

    @Basic
    @Column(name = "gid_rpid", nullable = true, length = 40)
    public String getGidRpid() {
        return gidRpid;
    }

    public void setGidRpid(String gidRpid) {
        this.gidRpid = gidRpid;
    }

    @Basic
    @Column(name = "gid", nullable = true)
    public Long getGid() {
        return gid;
    }

    public void setGid(Long gid) {
        this.gid = gid;
    }

    @Basic
    @Column(name = "rpid", nullable = true)
    public Long getRpid() {
        return rpid;
    }

    public void setRpid(Long rpid) {
        this.rpid = rpid;
    }

    @Basic
    @Column(name = "name", nullable = true, length = 30)
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "add_bed", nullable = true)
    public Long getAddBed() {
        return addBed;
    }

    public void setAddBed(Long addBed) {
        this.addBed = addBed;
    }

    @Basic
    @Column(name = "add_bed_price", nullable = true)
    public Long getAddBedPrice() {
        return addBedPrice;
    }

    public void setAddBedPrice(Long addBedPrice) {
        this.addBedPrice = addBedPrice;
    }

    @Basic
    @Column(name = "currency_code", nullable = true)
    public Long getCurrencyCode() {
        return currencyCode;
    }

    public void setCurrencyCode(Long currencyCode) {
        this.currencyCode = currencyCode;
    }

    @Basic
    @Column(name = "shijia_tag", nullable = true)
    public Long getShijiaTag() {
        return shijiaTag;
    }

    public void setShijiaTag(Long shijiaTag) {
        this.shijiaTag = shijiaTag;
    }

    @Basic
    @Column(name = "jishiqueren_tag", nullable = true)
    public Long getJishiquerenTag() {
        return jishiquerenTag;
    }

    public void setJishiquerenTag(Long jishiquerenTag) {
        this.jishiquerenTag = jishiquerenTag;
    }

    @Basic
    @Column(name = "lock_start_time", nullable = true)
    public Date getLockStartTime() {
        return lockStartTime;
    }

    public void setLockStartTime(Date lockStartTime) {
        this.lockStartTime = lockStartTime;
    }

    @Basic
    @Column(name = "lock_end_time", nullable = true)
    public Date getLockEndTime() {
        return lockEndTime;
    }

    public void setLockEndTime(Date lockEndTime) {
        this.lockEndTime = lockEndTime;
    }

    @Basic
    @Column(name = "match_status", nullable = true)
    public Long getMatchStatus() {
        return matchStatus;
    }

    public void setMatchStatus(Long matchStatus) {
        this.matchStatus = matchStatus;
    }

    @Basic
    @Column(name = "match_info", nullable = true, length = 30)
    public String getMatchInfo() {
        return matchInfo;
    }

    public void setMatchInfo(String matchInfo) {
        this.matchInfo = matchInfo;
    }

    @Basic
    @Column(name = "vendor", nullable = true, length = 100)
    public String getVendor() {
        return vendor;
    }

    public void setVendor(String vendor) {
        this.vendor = vendor;
    }

    @Basic
    @Column(name = "is_match", nullable = true, length = 2)
    public String getIsMatch() {

        return isMatch;
    }

    public void setIsMatch(String isMatch) {
        this.isMatch = isMatch;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        TaobaoXrate that = (TaobaoXrate) o;

        if (mcCode != null ? !mcCode.equals(that.mcCode) : that.mcCode != null) return false;
        if (mcdCode != null ? !mcdCode.equals(that.mcdCode) : that.mcdCode != null) return false;
        if (rpCode != null ? !rpCode.equals(that.rpCode) : that.rpCode != null) return false;
        if (hotelRpCode != null ? !hotelRpCode.equals(that.hotelRpCode) : that.hotelRpCode != null) return false;
        if (rmtype != null ? !rmtype.equals(that.rmtype) : that.rmtype != null) return false;
        if (gidRpid != null ? !gidRpid.equals(that.gidRpid) : that.gidRpid != null) return false;
        if (gid != null ? !gid.equals(that.gid) : that.gid != null) return false;
        if (rpid != null ? !rpid.equals(that.rpid) : that.rpid != null) return false;
        if (name != null ? !name.equals(that.name) : that.name != null) return false;
        if (addBed != null ? !addBed.equals(that.addBed) : that.addBed != null) return false;
        if (addBedPrice != null ? !addBedPrice.equals(that.addBedPrice) : that.addBedPrice != null) return false;
        if (currencyCode != null ? !currencyCode.equals(that.currencyCode) : that.currencyCode != null) return false;
        if (shijiaTag != null ? !shijiaTag.equals(that.shijiaTag) : that.shijiaTag != null) return false;
        if (jishiquerenTag != null ? !jishiquerenTag.equals(that.jishiquerenTag) : that.jishiquerenTag != null)
            return false;
        if (lockStartTime != null ? !lockStartTime.equals(that.lockStartTime) : that.lockStartTime != null)
            return false;
        if (lockEndTime != null ? !lockEndTime.equals(that.lockEndTime) : that.lockEndTime != null) return false;
        if (matchStatus != null ? !matchStatus.equals(that.matchStatus) : that.matchStatus != null) return false;
        if (matchInfo != null ? !matchInfo.equals(that.matchInfo) : that.matchInfo != null) return false;
        if (vendor != null ? !vendor.equals(that.vendor) : that.vendor != null) return false;
        return isMatch != null ? isMatch.equals(that.isMatch) : that.isMatch == null;

    }

    @Override
    public int hashCode() {
        int result = mcCode != null ? mcCode.hashCode() : 0;
        result = 31 * result + (mcdCode != null ? mcdCode.hashCode() : 0);
        result = 31 * result + (rpCode != null ? rpCode.hashCode() : 0);
        result = 31 * result + (hotelRpCode != null ? hotelRpCode.hashCode() : 0);
        result = 31 * result + (rmtype != null ? rmtype.hashCode() : 0);
        result = 31 * result + (gidRpid != null ? gidRpid.hashCode() : 0);
        result = 31 * result + (gid != null ? gid.hashCode() : 0);
        result = 31 * result + (rpid != null ? rpid.hashCode() : 0);
        result = 31 * result + (name != null ? name.hashCode() : 0);
        result = 31 * result + (addBed != null ? addBed.hashCode() : 0);
        result = 31 * result + (addBedPrice != null ? addBedPrice.hashCode() : 0);
        result = 31 * result + (currencyCode != null ? currencyCode.hashCode() : 0);
        result = 31 * result + (shijiaTag != null ? shijiaTag.hashCode() : 0);
        result = 31 * result + (jishiquerenTag != null ? jishiquerenTag.hashCode() : 0);
        result = 31 * result + (lockStartTime != null ? lockStartTime.hashCode() : 0);
        result = 31 * result + (lockEndTime != null ? lockEndTime.hashCode() : 0);
        result = 31 * result + (matchStatus != null ? matchStatus.hashCode() : 0);
        result = 31 * result + (matchInfo != null ? matchInfo.hashCode() : 0);
        result = 31 * result + (vendor != null ? vendor.hashCode() : 0);
        result = 31 * result + (isMatch != null ? isMatch.hashCode() : 0);
        return result;
    }
}
